# -*- coding: utf-8 -*-
from celery import Celery

from logging import config as logger_config

from project import config
from project.logger import DICT_CONFIG
#
# logging.basicConfig(
#     stream=sys.stdout, level=logging.INFO, datefmt='%H:%M:%S',
#     format='%(asctime)s.%(msecs)03d %(levelname)8s %(funcName)16s %(filename)16s:%(lineno)3d %(message)s',
# )

logger_config.dictConfig(DICT_CONFIG)

project_app = Celery('project-app')
# project_app.config_from_object(config)
project_app.config_from_object('project.config')
project_app.autodiscover_tasks()

